﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace IdentityServerHost.Quickstart.UI
{
    public class RegisterInputModel
    {
        [Required]
        [EmailAddress]
        [Display(Name = "Email")]
        public string Email { get; set; }

        [StringLength(10, ErrorMessage = "用户名长度不少于2位.", MinimumLength =2)]
        [Display(Name = "Username")]
        public string Username{get;set;}

        [Required]
        [StringLength(100, ErrorMessage = "密码长度不少于6位.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "两次输入的密码不一至.")]
        public string ConfirmPassword { get; set; }
    }
}
